Method, apparatus, device, and storage medium for upgrading vehicle-mounted tbox

ABSTRACT

A method, apparatus, device, and a storage medium for upgrading a vehicle-mounted Tbox, which relate to the technical field of vehicle-mounted Tbox. The method comprises: when using a BOOTLOADER1 module that is used to store a power-on initial code for power-on startup, a vehicle-mounted Tbox determines whether version upgrading needs to be carried out (S401); and when it is determined that version upgrading needs to be carried out, the vehicle-mounted Tbox sequentially carries out version upgrading on a BOOTLOADER2 module for storing control logic and a diagnostic protocol stack code and app module (S402).

CROSS-REFERENCE TO RELATED APPLICATIONS

The present disclosure claims the priority of Chinese patent applicationCN 201811316169.2, entitled “Method, Apparatus, Device, and Storagemedium for Upgrading Vehicle-mounted Tbox” and filed on Nov. 7, 2018,the entirety of which is incorporated herein by reference.

FIELD OF THE INVENTION

The present disclosure relates to the technical field of vehicle-mountedTbox (Telematics Box), and in particular, to a method, apparatus,device, and storage medium for upgrading a vehicle-mounted Tbox.

BACKGROUND OF THE INVENTION

A vehicle-mounted Tbox is part of a telematics system, and is in chargeof functions including bus data collection, data reporting, and networkservices of a vehicle CAN (controller area network). The vehicle-mountedTbox is a pre-mounted product. That is, the vehicle-mounted Tbox ispre-mounted inside a vehicle before the vehicle leaves the factory.Therefore, in a case that the vehicle-mounted Tbox fails to start up dueto quality problems, a user cannot deal with it by himself/herself, andthe vehicle may only be returned to a 4S shop for maintenance.Therefore, there is a high demand for reliability of this product, and acircumstance that the vehicle-mounted Tbox fails to work should beavoided in any case. Since a vehicle-mounted Tbox product supports anetworking function, when a deficiency occurs in the Tbox product andthus it needs to update the software, bugs can be repaired by way ofFOTA (firmware over-the-air) upgrading. Considering the demand forreliability mentioned above, the whole upgrading process must be safeand reliable, and failing to start up due to upgrading is not allowed.

Seen from the software architecture, the Tbox adopts a manner of MCU(microcontroller unit)+MODEM. The system diagram of the Tbox is shown inFIG. 1. The MCU is mainly in charge of CAN bus data collection andperipheral circuit control, and the MODEM is mainly in charge offunctions including network services, interaction with the backgroundsystem, and the vehicle's multimedia. The FOTA upgrading solution of theMODEM is relatively mature, adopting an incremental upgrading solutionand supporting resuming upgrading from a breakpoint. However, the MCUpart only supports full-version upgrading, and if abnormal terminationoccurs during upgrading, it may lead to a circumstance that the devicefails to start up and cannot be used.

Vehicle-mounted MCUs basically adopt a solution of BOOTLOADER+APP. TheBOOTLOADER is in charge of functions including base initialization,startup process control, and diagnosis, and the APP is in charge ofupper layer business logic. As shown in FIG. 2, details are as follows.

(1) Power-on startup is carried out, and the MCU loads a BOOTLOADERimage; and the process jumps to execution.

(2) Base resources are initialized in BOOTLOADER1, and the APP isloaded.

(3) It is determined whether the APP is valid. The process jumps to theAPP if the APP is valid, and the process stays in the BOOTLOADER and runthe diagnostic protocol stack if the APP is not valid.

Since the diagnostic protocol stack is integrated in the BOOTLOADER, itis required to reserve enough storage space, otherwise the BOOTLOADERimage cannot be accommodated. Taking a 256 KB FLASH storage space forexample, starting from the first address, the first 32 KB space isassigned to the BOOTLOADER, and the remaining 224 KB space is assignedto the APP. When FOTA upgrading is carried out for the Tbox, the MODEMfirst updates its own version, and then performs version upgrading tothe MCU via a serial port after successfully upgrading its own version,so as to finally complete version upgrading of the whole device. Theupgrading process is shown in FIG. 3.

According to actual measurement, a total time length of MCU upgrading isabout 20 seconds. According to the size ratio of partitions, it can beconcluded that a time length of BOOTLOADER upgrading is about 2.5seconds. If circumstances including abnormal power failure, devicerestarting, and so on occur during this period, it would result in thedevice' failure to start up.

SUMMARY OF THE INVENTION

The technical problem to be solved by the solutions provided accordingto embodiments of the present disclosure is a risk that a device failsto start up due to abnormal interruption, such as abnormal powerfailure, device restarting, and so on, during a process of BOOTLOADERupgrading.

A method for upgrading a vehicle-mounted Tbox according to an embodimentof the present disclosure includes steps of: determining, by thevehicle-mounted Tbox, when using a BOOTLOADER1 module that is used tostore a power-on initial code for power-on startup, whether versionupgrading needs to be carried out; and carrying out, by thevehicle-mounted Tbox, when it is determined that version upgrading needsto be carried out, sequentially version upgrading on a BOOTLOADER2module for storing control logic and a diagnostic protocol stack codeand an APP module.

An apparatus for upgrading a vehicle-mounted Tbox according to anembodiment of the present disclosure comprises: a determining module fordetermining whether version upgrading needs to be carried out when aBOOTLOADER1 module that is used to store a power-on initial code is usedfor power-on startup; and an upgrading module for sequentially carryingout version upgrading on a BOOTLOADER2 module for storing control logicand a diagnostic protocol stack code and an APP module when it isdetermined that version upgrading needs to be carried out.

A device for upgrading a vehicle-mounted Tbox according to an embodimentof the present disclosure comprises a processor and a memory coupled tothe processor. The memory stores programs for upgrading avehicle-mounted Tbox that can be run on the processor, and the programsfor upgrading a vehicle-mounted Tbox, when executed by the processor,implement steps of the method for upgrading a vehicle-mounted Tboxaccording to an embodiment of the present disclosure.

A storage medium according to an embodiment of the present disclosurestores programs for upgrading a vehicle-mounted Tbox, and the programsfor upgrading a vehicle-mounted Tbox, when executed by a processor,implement steps of the method for upgrading a vehicle-mounted Tboxaccording to an embodiment of the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings illustrated are used for better understandingof the present disclosure, and constitute part of the presentdisclosure. Exemplary embodiments and description thereof are providedfor understanding the present disclosure, and do not constitute improperlimitation to the present disclosure. In the drawings:

FIG. 1 is a diagram of a system for upgrading a vehicle-mounted Tboxprovided in some circumstances;

FIG. 2 is a flowchart of MCU version upgrading provided in somecircumstances;

FIG. 3 is a flowchart of software upgrading and startup of avehicle-mounted Tbox.

FIG. 4 is a flowchart of a method for upgrading a vehicle-mounted Tboxprovided in an embodiment of the present disclosure;

FIG. 5 is a schematic diagram of an apparatus for upgrading avehicle-mounted Tbox provided in an embodiment of the presentdisclosure;

FIG. 6 is a schematic diagram showing comparison of new and old MEMORYMAPs provided in an embodiment of the present disclosure;

FIG. 7 is a flowchart of MCU startup provided in an embodiment of thepresent disclosure;

FIG. 8 is a flowchart of MCU self-repairing after power failure duringupgrading provided in an embodiment of the present disclosure;

FIG. 9 is a flowchart of MCU upgrading provided in an embodiment of thepresent disclosure; and

FIG. 10 is a flowchart of repairing after MCU upgrading fails providedin an embodiment of the present disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present disclosure will be described indetail with reference to the accompanying drawings. It should beunderstood that, the following preferred embodiments described are onlyused to describe and explain the present disclosure, rather than tolimit the present disclosure.

FIG. 4 is a flowchart of a method for upgrading a vehicle-mounted Tboxprovided in an embodiment of the present disclosure. As shown in FIG. 4,the method includes the following steps. At step S401, when using aBOOTLOADER1 module that is used to store a power-on initial code forpower-on startup, a vehicle-mounted Tbox determines whether versionupgrading needs to be carried out. At step S402, when it is determinedthat version upgrading needs to be carried out, the vehicle-mounted Tboxsequentially carries out version upgrading on a BOOTLOADER2 module forstoring control logic and a diagnostic protocol stack code and an APPmodule.

In an embodiment, after the vehicle-mounted Tbox carries out versionupgrading on the BOOTLOADER2 module and the APP module, the methodfurther includes the following steps: the vehicle-mounted Tbox detectswhether upgrading succeeds; and when it is detected that upgradingfails, the vehicle-mounted Tbox further detects a position whereupgrading fails and performs upgrading failure repairing according tothe position where upgrading fails.

In an embodiment, the step that the vehicle-mounted Tbox further detectsthe position where upgrading fails and performs upgrading failurerepairing according to the position where upgrading fails includes thefollowing steps: the vehicle-mounted Tbox determines, by reading a stateof GPIO1 and GPIO2, whether the position where upgrading fails islocated in the BOOTLOADER2 module or the APP module. When it isdetermined that the position where upgrading fails is located in theBOOTLOADER2 module, the vehicle-mounted Tbox sequentially carries outversion upgrading on the BOOTLOADER2 module and the APP module. When itis determined that the position where upgrading fails is located in theAPP module, the vehicle-mounted Tbox carries out version upgrading onthe APP module. The GPIO1 refers to general purpose input/output 1, andthe GPIO2 refers to general purpose input/output 2.

In the present embodiment, the GPIO1 and the GPIO2 are used as FLAGindications so as to inform the MODEM of the position where upgradingfails.

In an embodiment, the step that the vehicle-mounted Tbox determines, byreading a state of GPIO1 and GPIO2, whether the position where upgradingfails is located in the BOOTLOADER2 module or the APP module includesthe following steps: when the state of the GPIO1 and the GPIO2 is (0,1), the vehicle-mounted Tbox determines that the position whereupgrading fails is located in the BOOTLOADER2 module, and when the stateof the GPIO1 and the GPIO2 is (1, 0), the vehicle-mounted Tboxdetermines that the position where upgrading fails is located in the APPmodule; or when the state of the GPIO1 and the GPIO2 is (1, 0), thevehicle-mounted Tbox determines that the position where upgrading failsis located in the BOOTLOADER2 module, and when the state of the GPIO1and the GPIO2 is (0, 1), the vehicle-mounted Tbox determines that theposition where upgrading fails is located in the APP module.

FIG. 5 is a schematic diagram of an apparatus for upgrading avehicle-mounted Tbox provided in an embodiment of the presentdisclosure. As shown in FIG. 5, the apparatus includes a determiningmodule 501 and an upgrading module 502.

The determining module 501 is used to determine whether versionupgrading needs to be carried out when a BOOTLOADER1 module that is usedto store a power-on initial code is used for power-on startup. Theupgrading module 502 is used to sequentially carry out version upgradingon a BOOTLOADER2 module for storing control logic and a diagnosticprotocol stack code and an APP module when it is determined that versionupgrading needs to be carried out.

In the present embodiment, the apparatus further includes an upgradingfailure repairing module. The upgrading failure repairing module is usedto detect whether upgrading succeeds. If it is detected that upgradingfails, the module is further used to detect a position where upgradingfails and perform upgrading failure repairing according to the positionwhere upgrading fails.

In an embodiment, the upgrading failure repairing module includes: adetermining unit, which is used to determine, by reading a state ofGPIO1 and GPIO2, whether the position where upgrading fails is locatedin the BOOTLOADER2 module or the APP module; and an upgrading failurerepairing unit, which is used to sequentially carry out versionupgrading on the BOOTLOADER2 module and the APP module when it isdetermined that the position where upgrading fails is located in theBOOTLOADER2 module, and is used to carry out version upgrading on theAPP module when it is determined that the position where upgrading failsis located in the APP module. The determining unit is used to determinethat the position where upgrading fails is located in the BOOTLOADER2module when the state of the GPIO1 and the GPIO2 is (0, 1), and thevehicle-mounted Tbox determines that the position where upgrading failsis located in the APP module when the state of the GPIO1 and the GPIO2is (1, 0); or the determining unit is used to determine that theposition where upgrading fails is located in the BOOTLOADER2 module whenthe state of the GPIO1 and the GPIO2 is (1, 0), and the vehicle-mountedTbox determines that the position where upgrading fails is located inthe APP module when the state of the GPIO1 and the GPIO2 is (0, 1).

According to an embodiment of the present disclosure, a device forupgrading a vehicle-mounted Tbox is provided. The device includes aprocessor and a memory coupled to the processor. The memory storesprograms for upgrading a vehicle-mounted Tbox that can be run on theprocessor. The programs for upgrading a vehicle-mounted Tbox, whenexecuted by the processor, implement steps of the method for upgrading avehicle-mounted Tbox provided according to an embodiment of the presentdisclosure.

According to an embodiment of the present disclosure, a storage mediumis provided. The storage medium stores programs for upgrading avehicle-mounted Tbox. The programs for upgrading a vehicle-mounted Tbox,when executed by a processor, implement steps of the method forupgrading a vehicle-mounted Tbox provided according to an embodiment ofthe present disclosure.

In view of the risk that a device fails to start up due to upgrading inexisting solutions, by optimizing the existing software architecture ofthe MCU, the conventional manner of BOOTLOADER+APP is split into amanner of BOOTLOADER1+BOOTLOADER2+APP. The BOOTLOADER1 only stores apower-on initialization code, and the BOOTLOADER2 only stores remainingcontrol logic and diagnostic protocol stack. That is, the BOOTLOADER1 isonly in charge of power-on startup, and a software portion has a mostsimplified code and requires no maintenance. In this way, versionupgrading may start from the BOOTLOADER2, and the BOOTLOADER1 is freefrom damage whether abnormal interruption occurs or not duringupgrading. When power-on startup is performed again, an upgradingprocess can be restarted again, so as to avoid the circumstance that adevice fails to start up due to upgrading and improve reliability of aTbox product.

Since the power-on initialization code is simple and constant, itbasically requires no upgrading. In an optimized version upgradingsolution, upgrading starts from the BOOTLOADER2. Even if upgrading failsdue to abnormal termination during an upgrading process of theBOOTLOADER2, after powering off and restarting, the BOOTLOADER1 stillcan ensure that the Tbox can normally start up. After the MODEM startsup, the MODEM may detect that a prior upgrading process of the MCUfails, and re-initiates an upgrading action until upgrading of the MCUis completed.

The storage space is optimally configured. An improved MCU softwarearchitecture includes three stages, i.e., BOOTLOADER1+BOOTLOADER2+APP.The BOOTLOADER1 only includes a power-on guiding code, and only requiresa 2 KB space. The remaining space is assigned to the BOOTLOADER2+APP.Therefore, a new FLASH assignment manner is as follow: starting from thefirst address, 2 KB is assigned for the BOOTLOADER1; 30 KB is assignedfor the BOOTLOADER2; and 224 KB is assigned for the APP. Comparison ofnew and old MEMORY MAPs is shown in FIG. 6.

FIG. 7 is a flowchart of MCU startup provided in an embodiment of thepresent disclosure. As shown in FIG. 7, since the new architectureadopts two stages of BOOTLOADER for startup, a startup process of theMCU is adjusted correspondingly. The BOOTLOADER1 stage is a read-onlysection, which ensures that the device can still carry out aself-repairing upgrading process at the next power-on and ensures thatthe device do not fail to start up due to upgrading. Details are asfollows.

701) Power-on startup is performed, and the MCU loads a BOOTLOADER1image and controls the MODEM to start up.

702) The process jumps to the BOOTLOADER2 which performs initiation ofbase resources and performs startup process control.

703) The process jumps to the APP which runs Tbox application services.

FIG. 8 is a flowchart of MCU self-repairing after power failure duringupgrading provided in an embodiment of the present disclosure. As shownin FIG. 8, in the new software architecture, after upgrading isinterrupted due to abnormal power failure during an upgrading process,the Tbox automatically detects a prior upgrading failure after beingpowered on again and initiates a self-repairing process. No humaninterference is required in the whole process. The process is asfollows.

801) Power-on startup is performed, and the MCU loads a BOOTLOADER1image and instantly performs power-on startup to the MODEM.

802) An upgrading sign is read for determining whether the previousupgrading succeeds.

803) If upgrading succeeds, a normal startup process is performed; andif upgrading fails, detecting a position where upgrading fails isperformed.

804) In a case that upgrading fails and communication cannot beestablished, the MCU informs the MODEM of the position where upgradingfails by using GPIO to make a FLAG indication.

805) The MCU switches to a DOWNLOAD mode, and wait for restarting of theMODEM to repair the upgrading process.

FIG. 9 is a flowchart of MCU upgrading provided in an embodiment of thepresent disclosure. As shown in FIG. 9, in the new solution, aBOOTLOADER1 partition is a guiding program for power-on startup of thedevice, and thus there is a relative high demand for the reliability ofthe partition. Except being produced in the production line, it isforbidden to rewrite this section in other scenarios. In addition, a setof CRC checking algorithms are added, to ensure accuracy of theBOOTLOADER1 image and avoid the risk that a device fails to start up dueto image abnormity during upgrading. The process includes the followingsteps.

901) When upgrading starts, it is determined whether the device is in aproduction mode.

902) If the device is in the production mode and the BOOTLOADER1 needsto be ungraded, the CRC algorithms are used to check an upgrade packetso as to complete upgrading. After the upgrading of the BOOTLOADER1succeeds, the BOOTLOADER2 and the APP module are upgraded respectively.

903) If the device is in a user mode, it is forbidden to upgrade theBOOTLOADER1. At this time, any upgrading to the BOOTLOADER1 sectiondirectly reports an error and terminates, and only the BOOTLOADER2 andthe APP are upgraded.

FIG. 10 is a flowchart of repairing after MCU upgrading fails providedin an embodiment of the present disclosure. As shown in FIG. 10, twosigns, i.e., GPIO1 and GPIO2 are added in the MCU startup process. Thetwo signs serve to indicate a current startup state of the MCU for theMODEM. When a circumstance that upgrading of the MCU fails occurs, afterthe MODEM starts up, the MODEM can determine a position where upgradingfails through the two signs and restart the upgrading process.

1001) Upgrading begins.

1002) It is determined whether the previous upgrading fails, and if theprevious upgrading fails, a state of GPIO1 and GPIO2 is determined so asto determine a starting address for upgrading.

When the state of the GPIO1 and the GPIO2 is (0, 1), it is determinedthat the position in the MCU where upgrading fails is located in theBOOTLOADER2 module, and when the state of the GPIO1 and the GPIO2 is (1,0), it is determined that the position in the MCU where upgrading failsis located in the APP module; or when the state of the GPIO1 and theGPIO2 is (1, 0), it is determined that the position in the MCU whereupgrading fails is located in the BOOTLOADER2 module, and when the stateof the GPIO1 and the GPIO2 is (0, 1), it is determined that the positionin the MCU where upgrading fails is located in the APP module.

1003) The MODEM restarts the MCU, and enters an ISP upgrading mode.

1004) The MODEM runs an upgrading script to start upgrading.

1005) An upgrading result is returned, and the whole device isrestarted.

According to the solution provided in the present disclosure, theconventional manner of BOOTLOADER+APP is split into a manner ofBOOTLOADER1+BOOTLOADER2+APP. The BOOTLOADER1 only stores a power-oninitialization code, and the BOOTLOADER2 only stores remaining controllogic and diagnostic protocol stack. That is, the BOOTLOADER1 is only incharge of power-on startup, and a software portion has a most simplifiedcode and requires no maintenance. Version upgrading starts from theBOOTLOADER2, and the BOOTLOADER1 is free from damage whether abnormalinterruption occurs or not during upgrading. In this way, the risk thata device fails to start up due to abnormal operations such as powerfailure and restarting in an upgrading process can be solved, andreliability and stability of the product can be improved.

According to the solutions provided in the present disclosure, in thescenario of TBOX FOTA upgrading, the existing MCU software architectureand upgrading solution are optimized, which solves the risk that adevice fails to start up due to BOOTLOADER upgrading and increasesmaintainability and reliability of the product.

Although the present disclosure has been described in detail above, thepresent disclosure is not limited thereto, and those skilled in the artcan make various modifications according to the principles of thepresent disclosure. Therefore, all modifications made in accordance withthe principles of the present disclosure should be understood as fallingwithin the protection scope of the present disclosure.

1. A method for upgrading a vehicle-mounted Tbox, comprising:determining, by the vehicle-mounted Tbox, when using a BOOTLOADER1module that is used to store a power-on initial code for power-onstartup, whether version upgrading needs to be carried out; and carryingout, by the vehicle-mounted Tbox, when it is determined that versionupgrading needs to be carried out, sequentially version upgrading on aBOOTLOADER2 module for storing control logic and a diagnostic protocolstack code and an APP module, wherein the Tbox refers to a telematicsbox.
 2. The method according to claim 1, wherein after the step ofcarrying out, by the vehicle-mounted Tbox, version upgrading on theBOOTLOADER2 module and the APP module, the method further comprises:detecting, by the vehicle-mounted Tbox, whether upgrading succeeds; anddetecting, by the vehicle-mounted Tbox, when it is detected thatupgrading fails, a position where upgrading fails and performingupgrading failure repairing according to the position where upgradingfails.
 3. The method according to claim 2, wherein detecting, by thevehicle-mounted Tbox, a position where upgrading fails and performingupgrading failure repairing according to the position where upgradingfails comprises: determining, by the vehicle-mounted Tbox, by reading astate of GPIO1 and GPIO2, whether the position where upgrading fails islocated in the BOOTLOADER2 module or the APP module; carrying out, bythe vehicle-mounted Tbox, when it is determined that the position whereupgrading fails is located in the BOOTLOADER2 module, sequentiallyversion upgrading on the BOOTLOADER2 module and the APP module; andcarrying out, by the vehicle-mounted Tbox, when it is determined thatthe position where upgrading fails is located in the APP module, versionupgrading on the APP module, wherein the GPIO1 refers to general purposeinput/output 1, and the GPIO2 refers to general purpose input/output 2.4. The method according to claim 3, wherein determining, by thevehicle-mounted Tbox, by reading a state of GPIO1 and GPIO2, whether theposition where upgrading fails is located in the BOOTLOADER2 module orthe APP module comprises: determining, by the vehicle-mounted Tbox, whenthe state of the GPIO1 and the GPIO2 is (0, 1), that the position whereupgrading fails is located in the BOOTLOADER2 module, and determining,by the vehicle-mounted Tbox, when the state of the GPIO1 and the GPIO2is (1, 0), that the position where upgrading fails is located in the APPmodule; or determining, by the vehicle-mounted Tbox, when the state ofthe GPIO1 and the GPIO2 is (1, 0), that the position where upgradingfails is located in the BOOTLOADER2 module, and determining, by thevehicle-mounted Tbox, when the state of the GPIO1 and the GPIO2 is (0,1), that the position where upgrading fails is located in the APPmodule.
 5. An apparatus for upgrading a vehicle-mounted Tbox,comprising: a determining module, for determining whether versionupgrading needs to be carried out when a BOOTLOADER1 module that is usedto store a power-on initial code is used for power-on startup; and anupgrading module, for sequentially carrying out version upgrading on aBOOTLOADER2 module for storing control logic and a diagnostic protocolstack code and an APP module when it is determined that versionupgrading needs to be carried out, wherein the Tbox refers to atelematics box.
 6. The apparatus according to claim 5, wherein theapparatus further comprises: an upgrading failure repairing module fordetecting whether upgrading succeeds, and further detecting a positionwhere upgrading fails and performing upgrading failure repairingaccording to the position where upgrading fails when it is detected thatupgrading fails.
 7. The apparatus according to claim 6, wherein theupgrading failure repairing module comprises: a determining unit fordetermining, by reading a state of GPIO1 and GPIO2, whether the positionwhere upgrading fails is located in the BOOTLOADER2 module or the APPmodule; and an upgrading failure repairing unit for sequentiallycarrying out version upgrading on the BOOTLOADER2 module and the APPmodule when it is determined that the position where upgrading fails islocated in the BOOTLOADER2 module, and carrying out version upgrading onthe APP module when it is determined that the position where upgradingfails is located in the APP module, wherein the GPIO1 refers to generalpurpose input/output 1, and the GPIO2 refers to general purposeinput/output
 2. 8. The apparatus according to claim 7, wherein thedetermining unit is used to determine that the position where upgradingfails is located in the BOOTLOADER2 module when the state of the GPIO1and the GPIO2 is (0, 1), and the vehicle-mounted Tbox determines thatthe position where upgrading fails is located in the APP module when thestate of the GPIO1 and the GPIO2 is (1, 0); or the determining unit isused to determine that the position where upgrading fails is located inthe BOOTLOADER2 module when the state of the GPIO1 and the GPIO2 is (1,0), and the vehicle-mounted Tbox determines that the position whereupgrading fails is located in the APP module when the state of the GPIO1and the GPIO2 is (0, 1).
 9. A device for upgrading a vehicle-mountedTbox, wherein the device comprises a processor and a memory coupled tothe processor, wherein the memory stores programs for upgrading avehicle-mounted Tbox that can be run on the processor, and the programsfor upgrading a vehicle-mounted Tbox, when executed by the processor,implement steps of the method for upgrading a vehicle-mounted Tboxaccording to claim
 1. 10. (canceled)